<template>
	<view class="dev">
		<view v-for="item in Patient" :key="item._id" class="video">
			<view class="dev1">
					<text>{{item.name}}</text> <text style="background: #d0edfe;">{{item.relation}}</text>
				
			</view>
			<view class="dev2">
				<text>{{item.sex}}</text><text>{{item.age}}岁</text><text>{{item.phone}}</text>
			</view>
		</view>
		<button >添加就诊人</button>
	</view>
</template>

<script>
	import {Patientlist} from "../utils/api"
	export default{
		data(){
			return{
				Patient:[]
			}
		},
		methods:{
			// add(){
			// 	uni.navigateTo({
			// 		url:'/pages/run/run'
			// 	})
			// }
		},
		onLoad(){
			Patientlist().then(res=>{
				console.log(res);
				this.Patient=res.data.data
			})
		}
	}
</script>

<style lang="scss" scoped>
	.dev{
		background: #ccc;
		height: 100vh;
	}
	.dev1{
		display: flex;
	}
.dev2{
	display: flex;
	margin: 10px 0;
	color: #ccc;
}
.video{
	background: #fff;
	height: 50px;
	margin: 10px 0;
}
</style>
